package 命令模式;

/**
 * @author zzs
 * @ClassName LightCloseCommand.java
 * @Description
 * @createTime 2022年05月16日 19:16:00
 */
public class LightCloseCommand implements Command {
    public LightCloseCommand(Light light) {
        this.light = light;
    }

    private final Light light;

    @Override
    public void execute() {
        light.close();

    }

    @Override
    public void undo() {
        light.open();
    }
}
